package com.augurit.gzcgwsp.rqqyjyxk.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.orm.Page;

import com.augurit.gzcgwsp.excelimportexport.entity.YwRqQyjyxkZyaqjsglryzk;
import com.augurit.gzcgwsp.rqqyjyxk.dao.YwRqQyjyxkFinalZyaqjsglryzkDao;
import com.augurit.gzcgwsp.rqqyjyxk.entity.YwRqQyjyxkFinalZyaqjsglryzk;
import com.augurit.gzcgwsp.rqqyjyxk.service.IYwRqQyjyxkFinalZyaqjsglryzkService;
/**
 * 
 * <P>title:最终数据从业人员service实现类</p>																								
 * <P>Description：</p>
 * <p>Copyright: Copyright (c) 2011 augurit</p>
 * <p>Company: 广州奥格智能科技</p>
 * History：
 * @author:zhangjun
 * @date Oct 15, 2011
 * @version 1.0
 */
@Service("zyaqryService")
@Transactional
public class YwRqQyjyxkFinalZyaqjsglryzkServiceImpl   implements IYwRqQyjyxkFinalZyaqjsglryzkService{
	@Autowired
	private YwRqQyjyxkFinalZyaqjsglryzkDao zyaqryDao;

    public List<YwRqQyjyxkFinalZyaqjsglryzk> getInfosByQyid(Long qyid) {
       String  sql=" from "+ YwRqQyjyxkFinalZyaqjsglryzk.class.getName()+" where qyid='"+qyid+"'";
        return zyaqryDao.find(sql);
    }

    public Map save(YwRqQyjyxkFinalZyaqjsglryzk finalentity) {
        zyaqryDao.save(finalentity);
        return null;
    }

    /*
     * (non-Javadoc)
     * @see com.augurit.gzcgwsp.rqqyjyxk.service.IYwRqQyjyxkFinalZyaqjsglryzkService#getPersonPage(java.lang.String, org.springside.modules.orm.Page, java.lang.Long, java.lang.String)
     */
	public Page getPersonPage(String acceptNo, Page page, Long qyid,
			String type) {
		 String  hql=" from "+ YwRqQyjyxkZyaqjsglryzk.class.getName()+" where acceptNo='"+acceptNo+"'";
		    if("2".equals(type)){
		    	hql=" from "+ YwRqQyjyxkFinalZyaqjsglryzk.class.getName()+" where qyid='"+qyid+"'";
		    	
		    }
			 return zyaqryDao.findPage(page, hql, new HashMap());
	}

    

}
